/**
 * Class: ScriptExecutor
 *
 * Purpose: 
 *
 * @author Ken Scott
 */

package org.openfantasia.util.misc.script;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

public class JavaScriptEvaluator {

	private ScriptEngine engine;

	public JavaScriptEvaluator() {
		ScriptEngineManager manager = new ScriptEngineManager();
		engine = manager.getEngineByName("js");
	}


	public Object eval(String script) throws ScriptException {
		return engine.eval(script);
	}

}
